package com.wf.smartcomm.server.bean;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.google.gson.annotations.Expose;

@Entity
@Table(name = "t_property_fee")
public class PropertyFee {
	@Expose
	@Id
	@Column(length = 32)
	private String objectId;
	
	@Expose
	@Column(length = 20)
	private String createdAt;
	
	@Expose
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="vid")
	private Village village;
	
	@Expose
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="uid")
	private User user;
	
	@Expose
	@Column
	private BigDecimal price;
	
	@Expose
	@Column
	private Integer period;

	public String getObjectId() {
		return objectId;
	}

	public void setObjectId(String objectId) {
		this.objectId = objectId;
	}

	public String getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(String createdAt) {
		this.createdAt = createdAt;
	}

	public Village getVillage() {
		return village;
	}

	public void setVillage(Village village) {
		this.village = village;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public Integer getPeriod() {
		return period;
	}

	public void setPeriod(Integer period) {
		this.period = period;
	}
}
